package com.ie.controller;

import com.ie.common.http.Result;
import com.ie.entity.shouchang;
import com.ie.service.shouchangService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/shouchang")
public class shouchangController {
    @Resource
    private shouchangService shouchangService;

    @RequestMapping("/find")
    public Result findShouchang(@RequestParam("userid") String userid) {


        return shouchangService.findShouchang( userid);
    }
    //收藏
    @RequestMapping("/add")
    public Result addShouchang(@RequestParam("user_id") String userid, @RequestParam("c_id") String c_id) {
        System.err.println(userid);
        System.err.println(c_id);
        return shouchangService.addShouchang(userid, c_id);
    }
}
